/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package azhar.engine;

import java.io.*;

/**
 *
 * @author Al-Insan
 */
public class SoundNotification{

    private SimpleSoundPlayer simple;

    public SoundNotification(){
    }

    public void playInboxSound()throws Exception{
        simple = new SimpleSoundPlayer("sound/inbox.wav");
        InputStream stream = new ByteArrayInputStream(simple.getSamples());
        simple.play(stream);
    }

    public void playErrorSound()throws Exception{
        simple = new SimpleSoundPlayer("sound/error.wav");
        InputStream stream = new ByteArrayInputStream(simple.getSamples());
        simple.play(stream);
    }
}
